#parse("admin/inc/goodsleft.html")
<script type="text/javascript"
	src="$thiscontextpath/ckeditor/ckeditor.js">
</script>
<script type="text/javascript"
	src="$thiscontextpath/ckfinder/ckfinder.js">
</script>

<script type="text/javascript" src="$thiscontextpath/admin/js/jquery-1.2.6.min.js">
</script>
<script type="text/javascript" src="$thiscontextpath/admin/js/jquery.form.js">
</script>


<style type="text/css">
.nTab {
	float: left;
	width: 100%;
	margin: 0 auto;
	border-bottom: 1px #AACCEE solid;
	background: #d5d5d5;
	background-position: left;
	background-repeat: repeat-y;
	margin-bottom: 2px;
}

.nTab .TabTitle {
	clear: both;
	height: 30px;
	overflow: hidden;
}

.nTab .TabTitle ul {
	border: 0;
	margin: 0;
	padding: 0;
}

.nTab .TabTitle li {
	float: left;
	width: 120px;
	height: 30px;
	cursor: pointer;
	padding-top: 4px;
	padding-right: 0px;
	padding-left: 0px;
	padding-bottom: 2px;
	list-style-type: none;
	font-size: 12px;
	text-align: center;
	margin: 0;
}

.nTab .TabTitle .active {
	background: #fff;
	border-left: 1px #AACCEE solid;
	border-top: 1px #AACCEE solid;
	border-right: 1px #AACCEE solid;
	border-bottom: 1px #fff solid;
}

.nTab .TabTitle .normal {
	background: #ECEFE7;
	border: 1px #AACCEE solid;
}

.nTab .TabContent {
	width: auto;
	background: #fff;
	margin: 0px auto;
	padding: 10px 0 0 0;
	border-right: 1px #AACCEE solid;
	border-left: 1px #AACCEE solid;
}

.none {
	display: none;
}
</style>
<script type="text/javascript">
function nTabs(thisObj, Num) {
	if (thisObj.className == "active")
		return;
	var tabObj = thisObj.parentNode.id;
	var tabList = document.getElementById(tabObj).getElementsByTagName("li");
	for (i = 0; i < tabList.length; i++) {
		if (i == Num) {
			thisObj.className = "active";
			document.getElementById(tabObj + "_Content" + i).style.display = "block";
		} else {
			tabList[i].className = "normal";
			document.getElementById(tabObj + "_Content" + i).style.display = "none";
		}
	}
}
</script>

<div id="center-column">
	<div class="top-bar">
		<a href="new" class="button">增加 商品 </a>
		<h1>
			<strong>增加 商品</strong>
		</h1>
		<div class="breadcrumbs">
			<a href="#">Homepage</a> /
			<a href="#">Contents</a>
		</div>
	</div>
	<br />
	<div class="select-bar">
	</div>
	<div class="table">
		<div class="nTab" style="width: 613px">
			<!-- 标题开始 -->
			<div class="TabTitle">
				<ul id="myTab1">
					<li class="active" onclick="nTabs(this,0);">
						商品基本信息
					</li>
					<li class="normal" onclick="nTabs(this,1);">
						商品相册
					</li>
					<li class="normal" onclick="nTabs(this,2);">
						商品关联
					</li>
						<li class="normal" onclick="nTabs(this,3);">
						扩展信息
					</li>
					<li class="normal" onclick="nTabs(this,4);">
						扩展服务
					</li>

				</ul>
			</div>
			<!-- 内容开始 -->
			<div class="TabContent">
				<div id="myTab1_Content0">
					<form name="addgoods" id="addgoods" method="post" action="save">
						<table class="listing form" cellpadding="0" cellspacing="0">

							<tr>
								<td class="first"">
									<strong>商品名称</strong>
								</td>
								<td class="last">
									<INPUT type="text" class=text name=goodsName>

								</td>
							</tr>
							<tr>
								<td class="first"">
									<strong>商品编号</strong>
								</td>
								<td class="last">
									<INPUT type="text" class=text name=goodsSn>

								</td>
							</tr>
							<tr>
								<td class="first" width="172">
									<strong>所属类目</strong>
								</td>
								<td class="last">
									<select style="width: 65%" name="categoryId">
										#if( $categorylist.size() > 0) #foreach ( $gcategory in
										${categorylist})
										<option value="${gcategory.categoryID}">
											${gcategory.categoryName}
										</option>
										#end #end
									</select>
								</td>
							</tr>
							<tr>
								<td class="first"">
									<strong>所属频道</strong>
								</td>
								<td class="last">

									<select style="width: 65%" name="channelId">
										#if( $channellist.size() > 0) #foreach ( $data in
										${channellist})
										<option value="${data.channelId}">
											${data.channelTitle}
										</option>
										#end #end
									</select>
								</td>
							</tr>


							<tr>
								<td class="first"">
									<strong>商品品牌</strong>
								</td>
								<td class="last">
									<select style="width: 65%" name="brandId">
										#if( $brandlist.size() > 0) #foreach ( $branddata in
										${brandlist})
										<option value="${branddata.brandID}">
											${branddata.brandName}
										</option>
										#end #end
									</select>

								</td>
							</tr>
							<tr>
								<td class="first"">
									<strong>商品类型</strong>
								</td>
								<td class="last">
									<select style="width: 65%" name="goodsType">
										<option value='1'>
											手机
										</option>
										<option value='2'>
											手机配件
										</option>
										<option value='3'>
											手机保险
										</option>
										<option value='4'>
											手机增值
										</option>
									</select>

								</td>
							</tr>
							<tr>
								<td class="first"">
									<strong>是否促销</strong>
								</td>
								<td class="last">
									<input type="checkbox" name="isBest" value="1" />
									精品
									<input type="checkbox" name="isNew" value="1" />
									新品
									<input type="checkbox" name=isHot value="1" />
									热销
									<input type="checkbox" name="isGroup" value="1" />
									团购
									<input type="checkbox" name="isOnSale" value="1" />
									上架
									<input type="checkbox" name="isPromote" value="1" />
									促销

								</td>
							</tr>
							<tr>
								<td class="first"">
									<strong>市场价</strong>
								</td>
								<td class="last">
									<INPUT type="text" class=text name=marketPrice>

								</td>
							</tr>

							<tr>
								<td class="first"">
									<strong>团购价</strong>
								</td>
								<td class="last">
									<INPUT type="text" class=text name=groupPrice>

								</td>
							</tr>
							<tr>
								<td class="first"">
									<strong>商城价</strong>
								</td>
								<td class="last">
									<INPUT type="text" class=text name=shopPrice>

								</td>
							</tr>

							<tr>
								<td class="first"">
									<strong>库存告警数量</strong>
								</td>
								<td class="last">
									<INPUT type="text" class=text name=warnNumber>

								</td>
							</tr>



							<tr>
								<td class="first"">
									<strong>商品简介</strong>
								</td>
								<td class="last">
									<textarea id="TextArea1" cols="75" rows="8" name="goodsBrief"></textarea>

								</td>
							</tr>
							<tr>
								<td class="first"">
									<strong>商品描述</strong>
								</td>
								<td class="last">
									<textarea id="TextArea1" cols="15" rows="8" class="ckeditor"
										name="goodsDesc"></textarea>

								</td>
							</tr>


						</table>
				</div>
				<div id="myTab1_Content1" class="none">
					<table class="listing form" cellpadding="0" cellspacing="0">
						<script type="text/javascript">

function BrowseServer(inputId) {
	var finder = new CKFinder();
	finder.basePath = '../ckfinder/'; //导入CKFinder的路径
	finder.selectActionFunction = SetFileField; //设置文件被选中时的函数
	finder.selectActionData = inputId; //接收地址的input ID
	finder.popup();
}

//文件选中时执行
function SetFileField(fileUrl, data) {
	document.getElementById(data["selectActionData"]).value = fileUrl;
}
</script>


						<tr>
							<td class="first"">
								<strong>缩略图片</strong>
							</td>
							<td class="last">
								<input id="imgUrl" name="imgUrl" type="text" size=40 />
								<input type="button" value="浏览图片"
									onclick="BrowseServer( 'imgUrl' );" />


							</td>
						</tr>
						<tr>
							<td class="first"">
								<strong>商品图片</strong>
							</td>
							<td class="last">
								<input id="thumbUrl" name="thumbUrl" type="text" size=40 />
								<input type="button" value="浏览图片"
									onclick="BrowseServer( 'thumbUrl' );" />


							</td>
						</tr>
						<tr>
							<td class="first"">
								<strong>原始图片</strong>
							</td>
							<td class="last">
								<input id="imgOriginal" name="imgOriginal" type="text" size=40 />
								<input type="button" value="浏览图片"
									onclick="BrowseServer( 'imgOriginal' );" />
							</td>
						</tr>
						
							<tr>
							<td class="first"">
								<strong>图片一</strong>
							</td>
							<td class="last">
								<input id="img1" name="img1" type="text" size=40 />
								<input type="button" value="浏览图片"
									onclick="BrowseServer( 'img1' );" />
							</td>
						</tr>
							<tr>
							<td class="first"">
								<strong>图片二</strong>
							</td>
							<td class="last">
								<input id="img2" name="img2" type="text" size=40 />
								<input type="button" value="浏览图片"
									onclick="BrowseServer( 'img2' );" />
							</td>
						</tr>
							<tr>
							<td class="first"">
								<strong>图片三</strong>
							</td>
							<td class="last">
								<input id="img3" name="img3" type="text" size=40 />
								<input type="button" value="浏览图片"
									onclick="BrowseServer( 'img3' );" />
							</td>
						</tr>
							<tr>
							<td class="first"">
								<strong>图片四</strong>
							</td>
							<td class="last">
								<input id="img4" name="img4" type="text" size=40 />
								<input type="button" value="浏览图片"
									onclick="BrowseServer( 'img4' );" />
							</td>
						</tr>
							<tr>
							<td class="first"">
								<strong>图片五</strong>
							</td>
							<td class="last">
								<input id="img5" name="img5" type="text" size=40 />
								<input type="button" value="浏览图片"
									onclick="BrowseServer( 'img5' );" />
							</td>
						</tr>
							<tr>
							<td class="first"">
								<strong>图片六</strong>
							</td>
							<td class="last">
								<input id="img6" name="img6" type="text" size=40 />
								<input type="button" value="浏览图片"
									onclick="BrowseServer( 'img6' );" />
							</td>
						</tr>
					</table>

				</div>
				<!-- 3 -->
				<div id="myTab1_Content2" class="none">

<script type="text/javascript"> 
$(document).ready(function(){
	
	//hide message_body after the first one
	$(".message_list .message_body:gt(0)").hide();
	
	//hide message li after the 5th
	$(".message_list li:gt(4)").hide();
 
	
	//toggle message_body
	$(".message_head").click(function(){
		$(this).next(".message_body").slideToggle(500)
		return false;
	});
 
	//collapse all messages
	$(".collpase_all_message").click(function(){
		$(".message_body").slideUp(500)
		return false;
	});
 
	//show all messages
	$(".show_all_message").click(function(){
		$(this).hide()
		$(".show_recent_only").show()
		$(".message_list li:gt(4)").slideDown()
		return false;
	});
 
	//show recent messages only
	$(".show_recent_only").click(function(){
		$(this).hide()
		$(".show_all_message").show()
		$(".message_list li:gt(4)").slideUp()
		return false;
	});
 
});
</script> 
 
<ol class="message_list"> 
 #foreach($param in ${datamap.keySet()})  
  <li> 
		<p class="message_head"><cite>   
		
		 #foreach ( $cate in ${categorylist})
		 
		#if( ${cate.categoryID}==$param )
        <th>$cate.categoryName</th>  
        #end #end
        </cite> </p> 
        <div class="message_body"> 
        #foreach ( $data2 in ${datamap.get($param)})
        
       <input type="checkbox" name="relationId" value="${data2.goodsId}" /> <img src="$thiscontextpath/${data2.goodsImg}" width=50 height=50 /> $data2.goodsName  </br>
    <input type="hidden" name="_relationId" value="0" /> 
    
    
    #end    #end  
</ol>
				
				
				</div>
				
				
	<div id="myTab1_Content3" class="none">
		<table class="listing form" cellpadding="0" cellspacing="0">
 
 								<tr>
								<td class="first"">
									<strong>手机类型</strong>
								</td>
								<td class="last">
						   <select style="width: 65%" name="mobileType">
										<option value="1">
											合约机
										</option>
									 <option value="0">
											非合约机
										</option>
									</select>  
								</td>
							</tr>
							
							<tr>
								<td class="first"">
									<strong>手机颜色</strong>
								</td>
								<td class="last">
						   <select style="width: 65%" name="mobileColor">
										#if( $colorList.size() > 0) #foreach ( $colordata in
										${colorList})
										<option value="${colordata.colorId}">
											${colordata.colorName}
										</option>
										#end #end
									</select>  
								</td>
							</tr>
						 
							<tr>
								<td class="first"">
									<strong>容量版本</strong>
								</td>
								<td class="last">
								 
							  <select style="width: 65%" name="mobileVersion">
										#if( $storageList.size() > 0) #foreach ( $storagedata in
										${storageList})
										<option value="${storagedata.storageId}">
											${storagedata.storageName}
										</option>
										#end #end
									</select>  
								</td>
							</tr> 
							
							
							<tr>   
								<td class="first"">
									<strong>操作系统</strong>
								</td>
								<td class="last">
							 
							  <select style="width: 65%" name="mobileOs">
										#if( $osList.size() > 0) #foreach ( $osdata in
										${osList})
										<option value="${osdata.osId}">
											${osdata.osName}
										</option>
										#end #end
									</select>  
								</td>
							</tr> 
							 
							 
							<tr>
								<td class="first"">
									<strong>屏幕尺寸</strong>
								</td>
								<td class="last">
								 
							   <select style="width: 65%" name="mobileScreensize">
										#if( $screensizeList.size() > 0) #foreach ( $sizedata in
										${screensizeList})
										<option value="${sizedata.screensizeId}">
											${sizedata.screensizeName}
										</option>
										#end #end
									</select>  
								</td>
							</tr> 
							<tr>
								<td class="first"">
									<strong>限销区域</strong>
								</td>
								<td class="last">
								<select style="width: 65%" name="areaId">
										#if( $provinceList.size() > 0) #foreach ( $provincedata in
										${provinceList})
										<option value="${provincedata.provinceId}">
											${provincedata.provinceName}
										</option>
										#end #end
									</select>
								</td>
							</tr> 
							
								<tr>
								<td class="first"">
									<strong>手机特点</strong>
								</td>
								<td class="last">
								 <select style="width: 65%" name="mobileCharacteristic">
										#if( $featureList.size() > 0) #foreach ( $featuredata in
										${featureList})
										<option value="${featuredata.featureId}">
											${featuredata.featureName}
										</option>
										#end #end
									</select>  
								 
								</td>
							</tr> 
							
							<tr>
								<td class="first"">
									<strong>价格区间</strong>
								</td>
								<td class="last">
									  <select style="width: 65%" name="priceRegionId">
										#if( $priceRegionList.size() > 0) #foreach ( $regiondata in
										${priceRegionList})
										<option value="${regiondata.priceRegionId}">
											${regiondata.priceRegionName}
										</option>
										#end #end
									</select>  

								</td>
							</tr> 
							<tr>
								<td class="first"">
									<strong>手机描述</strong>
								</td>
								<td class="last">
								<textarea id="TextArea1" cols="75" rows="8" name="mobileDetail"></textarea>
									 
								</td>
							</tr> 
							</table>
</div>
		
						
	<div id="myTab1_Content4" class="none">
44444444

</div>		
				
				
				
				<tr>
					<td>
				<input type="submit" value="保 存" />
			</td>
			</tr>
				</form>
			
			</div>
		</div>

	</div>
</div>
 
</div>
<div id="footer"></div>
</div>


</body>
</html>
